/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.srcptit.javatrainning.hieptq.btvn2;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.StringTokenizer;


/**
 *
 * @author Hiep
 */
public class Bai2 {
    public static void main(String[] args) throws FileNotFoundException, IOException  {
        String s="";
        BufferedReader br=new BufferedReader(new FileReader("b2.txt"));
        s=br.readLine();
        System.out.println("Moi ban nhap xau: ");
        int dem=0;
        StringTokenizer st=new StringTokenizer(s);
        String xau=null;
        while(st.hasMoreTokens()){
            xau=st.nextToken();
            dem++;
        }
        System.out.println("So tu trong xau la: "+dem);
    }
}